//
//  CallTelephone.m
//  etionMisc
//
//  Created by wjxfhxy on 13-9-28.
//  Copyright (c) 2013年 wjxfhxy. All rights reserved.
//

#import "XMSCallTelephone.h"

#import <UIKit/UIKit.h>

//#import "NSStringExtend.h"

@interface XMSCallTelephone ()
{
    UIWebView *_callView;
}

@end

@implementation XMSCallTelephone

static XMSCallTelephone *s_callView;

+(void)callTelephone:(NSString*)szPhonenum
{
    if(s_callView == nil)
        s_callView = [XMSCallTelephone new];
    [s_callView callTelephone:szPhonenum];
}

-(void)callTelephone:(NSString*)szPhonenum
{
    NSURL* callURL = [NSURL URLWithString:[NSString stringWithFormat:@"tel://%@", szPhonenum]];
    if(_callView == nil)
        _callView = [[UIWebView alloc] initWithFrame:CGRectZero];
    [_callView loadRequest:[NSURLRequest requestWithURL:callURL]];
}

-(void)dealloc
{
    [_callView release_mm];
    superdealloc_mm;
}

@end
